import request from '@/utils/request'

/**
 * 获取商品的分页数据
 * @param {Number} currentPage 当前分页
 * @param {Number} pageSize 每一页的条数
 * @returns
 */
export const getGoodsList = (currentPage, pageSize) => {
  return request({
    method: 'get',
    url: `/goods/catelist?currentPage=${currentPage}&pageSize=${pageSize}`
  })
}

export const editCate = (data) => {
  return request({
    method: 'post',
    url: '/goods/editcate',
    data
  })
}

export const addCate = (data) => {
  return request({
    method: 'post',
    url: '/goods/addcate',
    data
  })
}
